<html>
<head>
    <title>__📺__</title>
    <meta name="referrer" content="never">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta http-equiv="Access-Control-Allow-Credentials" content="*"/>
    <link rel="shortcut icon" href="http://dev.acyou.cn/favicon.ico"  type="image/x-icon"/>

    <meta charset="UTF-8"/>
    <style>
        html, body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100%;
            border: 0;
            overflow: hidden
        }

        .favnow {
            width: 100%;
            height: 100%;
            background: #000
        }
    </style>
</head>
<body>
<div class="favnow"></div>


<script src="artplayer.hls.min.js"></script>
<script src="artplayer.js"></script>
<script type="text/javascript" src="js/jquery-3.7.1.min.js"></script>
<script>

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) {
            return decodeURIComponent(r[2]);
        }
        return null;
    }

    var initPlayUrl = getQueryString("url");
    if (initPlayUrl) {
        window.playUrl = initPlayUrl;
    }else {
        window.playUrl = "http://vd3.bdstatic.com/mda-qg7m5zswerba69r4/360p/h264/1720450618274808347/mda-qg7m5zswerba69r4.mp4";
    }


    /**
     * https://www.danmutv.com/play/tvid/QLdran7mSW4sM3.html
     */

    var options = {
        container: '.favnow',
        //url: 'http://qiniu.acyou.cn/video/20240617142317%40%E6%95%99%E4%BD%A0%E6%80%8E%E4%B9%88%E6%B7%B7%E7%A4%BE%E4%BC%9A03%E4%B8%AD%E5%9B%BD%E6%9C%80%E7%9C%9F%E5%AE%9E%E7%9A%84%E7%A4%BE%E4%BA%A4%E5%85%B3%E7%B3%BB.mp4',
        url: window.playUrl,
        //url: 'https://v.cdnlz3.com/20240627/24228_3480ea63/2000k/hls/mixed.m3u8',
        //type: 'm3u8',
        volume: 1,//播放器的默认音量
        isLive: false,//使用直播模式，会隐藏进度条和播放时间
        muted: false, //是否默认静音
        autoplay: true,//是否自动播放
        autoSize: false,
        autoMini: false,//当播放器滚动到浏览器视口以外时，自动进入 迷你播放 模式

        //设置面板，然后自带四个内置项：flip, playbackRate, aspectRatio, subtitleOffset
        setting: true,
        flip: true,//是否显示视频翻转功能，目前只出现在 设置面板 和 右键菜单 里
        aspectRatio: true,//是否显示视频长宽比功能，会出现在 设置面板 和 右键菜单 里
        playbackRate: true,//是否显示视频播放速度功能，会出现在 设置面板 和 右键菜单 里
        subtitleOffset: true,//字幕时间偏移，范围在 [-5s, 5s]，出现在 设置面板 里

        loop: false,//是否循环播放
        screenshot: true,//是否在底部控制栏里显示 视频截图 功能
        pip: true,//是否在底部控制栏里显示 画中画 的开关按钮
        fullscreen: true,//是否在底部控制栏里显示播放器 窗口全屏 按钮
        fullscreenWeb: true,//是否在底部控制栏里显示播放器 网页全屏 按钮

        playbackRateList: [.5, 1, 1.5, 2, 2.5, 3],
        miniProgressBar: true,//迷你进度条，只在播放器失去焦点后且正在播放时出现

        mutex: true,//假如页面里同时存在多个播放器，是否只能让一个播放器播放
        hotkey: true,//是否使用快捷键
        backdrop: true,
        playsInline: true,
        autoPlayback: true,
        airplay: true,
        theme: '#FF9900',
        cssVar: {},
        fastForward: true,
        layers: [],
        //控制层
        controls: [
            {
                name: 'next',
                index: 11,
                position: 'left',
                tooltip: "下一集",
                html: '<i class="art-icon art-icon-next hint--rounded hint--top" aria-label="下一集" style="display: flex;">' +
                    '<svg t="1719295562442" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6892" width="22" height="22">' +
                    '<path d="M251.806514 885.86163L510.914627 719.700906l244.70225499-155.899017A54.663326 54.663326 0 0 0 778.113702 530.64868L778.113702 866.127578a39.468106 39.468106 0 0 0 78.936211 0l0-705.097707a39.468106 39.468106 0 0 0-78.936211 0L778.113702 493.548661a55.058007 55.058007 0 0 0-22.49682001-33.35055l-244.70225499-155.899017-259.700135-165.766043c-30.193101-19.734053-65.51705499 8.880324-65.51705501 51.900559L185.69743699 833.56639C186.289458 876.783966 221.613413 905.595683 251.806514 885.86163z" p-id="6893" ></path></svg>' +
                    '</i>',
                style: {},
                click: function (item, $dom) {
                    //本地播放列表
                    var o = document.querySelector('#searchTvList .active');
                    if (o) {
                        o.nextSibling.click()
                    } else {
                        //选集播放列表
                        var t = document.querySelector('#listShow .active');
                        if (t) {
                            t.nextSibling.click()
                        }
                    }
                },
            }
        ],
        videoTitle: "《标题》",
        plugins: [
            episodesListPlugin(),
            searchTv()
            //videoTitlePlugin("《我是歌手2024 第一期》")
        ]
    };
    const art = new Artplayer(options);

    art.setting.add({
        name: 'leftSpeed',
        html: '长按速度',
        tooltip: '',
        icon: '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"\n' +
            '        "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' +
            '<svg t="1719493775517" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4626"\n' +
            '     width="48" height="48">\n' +
            '    <path d="M537.6 348.16c-15.36-15.36-40.96 0-40.96 20.48v66.56L384 348.16c-15.36-15.36-40.96 0-40.96 20.48v291.84c0 20.48 25.6 35.84 40.96 20.48l112.64-87.04v66.56c0 20.48 25.6 35.84 40.96 20.48l184.32-143.36c15.36-10.24 15.36-30.72 0-40.96l-184.32-148.48z"\n' +
            '          fill="white" p-id="4627"></path>\n' +
            '    <path d="M768 102.4H256C143.36 102.4 51.2 194.56 51.2 307.2v409.6c0 112.64 92.16 204.8 204.8 204.8h512c112.64 0 204.8-92.16 204.8-204.8V307.2c0-112.64-92.16-204.8-204.8-204.8z m133.12 614.4c0 71.68-61.44 133.12-133.12 133.12H256c-71.68 0-133.12-61.44-133.12-133.12V307.2c0-71.68 61.44-133.12 133.12-133.12h512c71.68 0 133.12 61.44 133.12 133.12v409.6z"\n' +
            '          fill="white" p-id="4628"></path>\n' +
            '</svg>',
        custom: "<input type=\"number\" min='0' max='5' step=\"0.1\" value='" + art.storage.getDefault("forwardSpeed", 3) + "' id='forwardSpeed' style=\"\n" +
            "    border-radius: 20px;\n" +
            "    text-align: center;\n" +
            "\">",
    });

    $(document).on("blur", "#forwardSpeed", function () {
        if ($(this).val()) {
            art.storage.set("forwardSpeed", $(this).val())
        }
    })

    function hasNext() {
        //本地播放列表
        var o = document.querySelector('#searchTvList .active');
        if (o) {
            if (o && o.nextSibling) {
                return true;
            }
        } else {
            //选集播放列表
            var t = document.querySelector('#listShow .active');
            if (t && t.nextSibling) {
                return true;
            }
        }
        return false;
    }


    function searchTv() {
        return (art) => {
            art.controls.add({
                name: 'searchTv',
                index: 4,
                position: 'right',
                html: '搜剧',
                style: {},
                click: function (item, $dom) {
                    var display = art.layers['searchTv'].style.display;
                    if (display && "none" === display) {
                        art.layers['searchTv'].style.display = 'block'
                        art.layers['episodes-list'].style.display = 'none'
                    } else {
                        art.layers['searchTv'].style.display = 'none'
                    }
                    return '搜剧';
                },
                mounted: ($control) => {
                    //console.info($control);
                }
            });


            art.layers.add({
                name: 'searchTv',
                html: `<div class="yxq-listbox yxq-stting" style="padding: 10px">
    <div class="anthology-wrap">
        <div class="video-list-cl"><a style="color:#ffffff;cursor:pointer;"
                                      onclick="javascript:art.layers['searchTv'].style.display = 'none'"
                                      title="点击关闭">✖</a></div>
        <div class="normal-title-wrap">
        <div>
            <h3>播放本地文件：</h3>
            <input type="file" id="file" multiple accept="video/*" onchange="onInputFileChange()">
        </div>
<div class="" style="
    /*margin-top: 30px;*/
">
<h3>搜索资源：</h3>
<input class="searchTvInput" type="text" name="k" id="search-input" autocomplete="current-search-input" placeholder="搜索电影、连续剧、综艺纪录、动漫">
<button class="searchTvButton" type="button">搜索</button></div>
        </div>
        <div class="scroll-area" id="listBox">
            <div class="yxq-selset-list anthology-content yxq-show" id="searchTvList">
<!--                <a style="cursor:pointer;"  class="box-item-line" title="第01集">第01集</a>
                <a style="cursor:pointer;"  class="box-item-line" title="第02集">第02集</a>
                <a style="cursor:pointer;"  class="box-item-line" title="第03集">第03集</a>-->
            </div>
        </div>
    </div>
</div>`,
                style: {
                    display: "none"
                },
                mounted: function ($el) {
                    const {proxy, icons, i18n} = art;
                    var searchTvButton = $el.querySelector(".searchTvButton");
                    proxy(searchTvButton, "click", () => {
                        var searchTvList = $el.querySelector("#searchTvList");
                        var searchTvInput = $el.querySelector(".searchTvInput");
                        if (searchTvInput.value) {
                            $(searchTvButton).text("搜索中...");
                            $.ajax({
                                cache: true,
                                type: "get",
                                dataType: "json",
                                timeout: 600000,
                                //url: "https://search.bfzyapi.com/json-api/?dname=baofeng&key="+searchTvInput.value+"&count=50",
                                url: "https://search.lziapi.com/json-api/?dname=liangzi&key=" + searchTvInput.value + "&count=50",
                                data: null,
                                async: true,
                                success: function (res) {
                                    console.log(res)
                                    $(searchTvList).empty();
                                    localStorage.setItem("searchTvList", JSON.stringify(res.posts))
                                    res.posts.forEach((x, i) => {
                                        var x1 = x.vod_name;
                                        var x2 = x.type_name;
                                        var x3 = x.vod_pic;
                                        var x4 = x.vod_play_url;
                                        var x5 = x.vod_play_url.split("#").length;
                                        $(searchTvList).append("<a style=\"cursor:pointer;\"  class=\"box-item-line\" data-info=\"" + x + "\" data-vod_pic=\"" + x3 + "\" data-urls=\"" + x4 + "\">" + x1 + "(" + x2 + ")" + x5 + "</a>")
                                    })
                                    $(searchTvButton).text("搜索");
                                },
                                error: function (res) {
                                    console.error(res)
                                    $(searchTvButton).text("搜索");
                                }
                            });
                        }
                        //console.info(3, searchTvInput.value,  $el);
                    });
                },
            },);


            function show() {
                art.layers['searchTv'].style.display = 'block';
            }

            function hide() {
                art.layers['searchTv'].style.display = 'none';
            }


            return {
                name: 'searchTv',
                show,
                hide
            };
        }
    }


    function episodesListPlugin() {
        return (art) => {
            art.controls.add({
                name: 'select-episodes',
                index: 5,
                position: 'right',
                html: '选集',
                style: {},
                click: function (item, $dom) {
                    var display = art.layers['episodes-list'].style.display;
                    if (display && "none" === display) {
                        art.layers['episodes-list'].style.display = 'block'
                        art.layers['searchTv'].style.display = 'none'
                    } else {
                        art.layers['episodes-list'].style.display = 'none'
                    }
                    return '选集';
                },
                mounted: ($control) => {
                    //console.info($control);
                }
            });


            art.layers.add({
                name: 'episodes-list',
                html: `<div id="episodesListDiv" class="yxq-listbox yxq-stting">
    <div class="anthology-wrap">
        <div class="video-list-cl"><a style="color:#ffffff;cursor:pointer;"
                                      onclick="javascript:art.layers['episodes-list'].style.display = 'none'"
                                      title="点击关闭">✖</a></div>
        <div class="normal-title-wrap">
            <div class="pic-text-item"><a>
                <div class="cover"><img class="bj vod_pic"
                                        src="http://dev.acyou.cn/videos/ad5be438e17b78a6bbec897d5c8d35a2.jpg">
                </div>
                <div class="anthology-title-wrap">
                    <div class="title">电影解说《让子弹飞》</div>
                    <div class="subtitle" style="max-height: 36px;"></div>
                    <div class="subtitle" style="max-height: 36px;"></div>
                    <div class="type_name subtitle">剧情、喜剧、动作、西部</div>
                    <div class="subtitle" style="max-height: 36px;">导演：姜文</div>
                    <div class="subtitle">主演：姜文、周润发、葛优、刘嘉玲、陈坤、周韵、廖凡、姜武</div>
                </div>
            </a></div>
            <div class="vod_content title-info">在民国乱世，马邦德（葛优饰）通过金钱捐得县长一职，携妻子（刘嘉玲饰）及随从踏上了前往鹅城的任途。然而，他们的旅程在南国的一片荒野中被劫匪张麻子（姜文饰）的伏击所打断，随从们惨遭杀害，只有马邦德夫妇侥幸逃生。为了保命，马邦德急中生智，谎称自己是县长的师爷，而张麻子则被马邦德所描述的财富所吸引，决定冒充县长，带领手下前往鹅城。鹅城，这个偏远之地，实际上由一方霸主黄四郎（周润发饰）掌控，他权势滔天，对新来的县长并不放在眼里。张麻子上任后不久，便与黄四郎的势力发生了冲突，他痛打了黄的武教头（姜武饰），而黄四郎则设计害死了张麻子的义子小六（张默饰）。原本只想要安稳赚钱的马邦德，意外地卷入了这场土匪与恶霸的权力斗争之中。鹅城上空笼罩着一层不祥的阴云，预示着即将到来的血雨腥风，一场关于权势、金钱与正义的较量即将展开。</div>
        </div>
        <div class="scroll-area" id="listBox">
        <!--<a class="component-title"><span style="font-size:12px">已完结</span></a>-->
            <div class="yxq-selset-list anthology-content yxq-show" id="listShow">
 <!--               <a style="cursor:pointer;color: #CC6633;"                 class="box-item album-title active"    title="第01集">第01集</a>
                <a style="cursor:pointer;"                class="box-item album-title"    title="第02集">第02集</a>
                <a style="cursor:pointer;"                class="box-item album-title"    title="第03集">第03集</a>-->
            </div>
        </div>
    </div>
</div>`,
                style: {
                    display: "none"
                },
                mounted: function ($el) {
                    //console.info(2, $el);
                },
            },);


            function show() {
                art.layers['episodes-list'].style.display = 'block';
            }

            function hide() {
                art.layers['episodes-list'].style.display = 'none';
            }

            return {
                name: 'select-episodes',
                show,
                hide
            };
        }
    }

    $("#listShow").on("click", ".box-item", function () {
        $("#listShow .active").removeClass("active")
        var index = $(this).parent().children().index($(this));
        localStorage.setItem("searchTvList_play_index", index)
        var playUrl = $(this).data("playurl");
        $(this).addClass("active")
        art.plugins['videoTitle'].update("《" + $("#episodesListDiv .title").text() + "》" + $(this).text())
        art.switchUrl(playUrl);
        art.play()
    })

    $("#searchTvList").on("click", ".box-item-line", function (e) {
        var index = $(this).parent().children().index($(this));
        art.layers['searchTv'].style.display = 'none'
        art.layers['episodes-list'].style.display = 'block'
        var searchTvListStr = localStorage.getItem("searchTvList");
        var parse = JSON.parse(searchTvListStr);
        var s = parse[index];
        localStorage.setItem("searchTvList_index", index)
        $("#episodesListDiv .title").text(s['vod_name'])
        $("#episodesListDiv .type_name").text(s['type_name'])
        $("#episodesListDiv .vod_content").html(s['vod_content'])
        $("#episodesListDiv .vod_pic").attr('src', s['vod_pic'])
        var playUrls = s['vod_play_url'].split("#")
        $("#listShow").empty();
        playUrls.forEach((x) => {
            var split = x.split("$");
            $("#listShow").append("<a style=\"cursor:pointer;\" data-playUrl='" + split[1] + "' class=\"box-item album-title\"    title=\"第03集\">" + split[0] + "</a>")
        })
    })
    $("#searchTvList").on("click", ".box-item-localfile", function (e) {
        var i = $(this).data("info");
        $(this).siblings().removeClass("active")
        $(this).addClass("active");
        if (i > -1) {
            var file = selectFiles[i];
            var url = URL.createObjectURL(file);
            art.type = "";
            art.plugins['videoTitle'].update(file.name)
            art.switchUrl(url);
            art.play()
        }
    })
    //搜剧剧集
    var searchTvList_index = localStorage.getItem("searchTvList_index");
    if (searchTvList_index) {
        var index = searchTvList_index;
        art.layers['searchTv'].style.display = 'none'
        art.layers['episodes-list'].style.display = 'block'
        var searchTvListStr = localStorage.getItem("searchTvList");
        var parse = JSON.parse(searchTvListStr);
        var s = parse[index];
        localStorage.setItem("searchTvList_index", index)
        $("#episodesListDiv .title").text(s['vod_name'])
        $("#episodesListDiv .type_name").text(s['type_name'])
        $("#episodesListDiv .vod_content").html(s['vod_content'])
        $("#episodesListDiv .vod_pic").attr('src', s['vod_pic'])
        var playUrls = s['vod_play_url'].split("#")
        $("#listShow").empty();
        playUrls.forEach((x) => {
            var split = x.split("$");
            $("#listShow").append("<a style=\"cursor:pointer;\" data-playUrl='" + split[1] + "' class=\"box-item album-title\"    title=\"第03集\">" + split[0] + "</a>")
        })
    }
    //剧集观看
    var searchTvList_play_index = localStorage.getItem("searchTvList_play_index");
    if (searchTvList_play_index) {
        var t = $("#listShow").children()[searchTvList_play_index];
        var playUrl = $(t).data("playurl");
        $(t).addClass("active")
        art.plugins['videoTitle'].update("《" + $("#episodesListDiv .title").text() + "》" + $(t).text())
        art.switchUrl(playUrl);
        art.on('ready', () => {
            art.play();
        });
    }
    var selectFiles = [];

    function onInputFileChange() {
        selectFiles = document.getElementById('file').files;
        if (selectFiles && selectFiles.length > 0) {
            var file = selectFiles[0];
            var url = URL.createObjectURL(file);
            art.type = "";
            art.plugins['videoTitle'].update(file.name)
            art.switchUrl(url);
            art.play()
            $("#searchTvList").empty();
            $.each(selectFiles, (i, f) => {
                var classact = "";
                if (i === 0) {
                    classact = "active";
                }
                $("#searchTvList").append("<a style=\"cursor:pointer;\" title='" + f.name + "' data-info=\"" + i + "\" class='box-item-localfile " + classact + "' >" + f.name + "</a>")
            })
        } else {
            $("#searchTvList").empty();
        }
    }

    art.on('video:ended', () => {
        if (hasNext()) {
            art.notice.show = '视频播放结束 3s播放下一集...';
            setTimeout(() => {
                art.notice.show = '视频播放结束 2s播放下一集...';
            }, 1000)
            setTimeout(() => {
                art.notice.show = '视频播放结束 1s播放下一集...';
            }, 2000)
            setTimeout(() => {
                art.controls['next'].click()
            }, 3000)
        }
    });

    document.addEventListener('keyup', function (event) {
        event.preventDefault();
        if ("PageUp" === event.code) {
            var o = document.querySelector('#searchTvList .active');
            if (o) {
                if (o && o.previousSibling) {
                    o.previousSibling.click()
                }
            } else {
                //选集播放列表
                var t = document.querySelector('#listShow .active');
                if (t && t.previousSibling) {
                    t.previousSibling.click()
                }
            }
        }
        if ("PageDown" === event.code) {
            art.controls['next'].click()
        }
    });

    function doQuery(text) {
        $.ajax({
            cache: true,
            type: "get",
            dataType: "json",
            //url: "https://search.bfzyapi.com/json-api/?dname=baofeng&key=莲花楼&count=50",
            url: "https://search.lziapi.com/json-api/?dname=liangzi&key=" + text + "&count=50",
            data: null,
            async: true,
            success: function (res) {
                console.log(res)
            },
            error: function (res) {
                console.error(res)
            }
        });
    }

    /*    function videoTitlePlugin(title) {
            return (art) => {
                art.layers.add(            {
                    name: 'videoTitle',
                    html: `<div class="video-title">${title}</div>`,
                    style: {

                    },
                    click: function (...args) {
                        //console.info('click', args);
                    },
                    mounted: function (...args) {
                        //console.info('mounted', args);
                    },
                });

                function show() {
                    art.layers.videoTitle.style.display = 'block';
                }

                function hide() {
                    art.layers.videoTitle.style.display = 'none';
                }

                //art.on('play', hide);
                //art.on('pause', show);

                art.on('control', (state) => {
                    if (state) {
                        show()
                    }else {
                        hide()
                    }
                });

                return {
                    name: 'videoTitlePlugin',
                    show,
                    hide
                };
            }
        }*/

    //const longPressDuration = 500;
    //var beforeTime = new Date().getTime();
    //var keyStatus = 0;
    //var before_playbackRate = 0;
    //document.addEventListener('keydown', function (event) {
    //    if (event.keyCode === 39) {
    //        if (keyStatus === 1) {
    //            //console.log("长按触发");
    //            if (before_playbackRate === 0) {
    //                before_playbackRate = art.playbackRate;
    //            }
    //            art.playbackRate = 3;
    //        } else {
    //            keyStatus = 1;
    //            beforeTime = new Date().getTime();
    //        }
    //    }
    //
    //});
    //
    //document.addEventListener('keyup', function (event) {
    //    if (event.keyCode === 39) {
    //        var now = new Date().getTime();
    //        if ((now - beforeTime) < longPressDuration) {
    //            //console.log("短按弹起", event)
    //            art.forward = 5;
    //        }else {
    //            //console.log("长按弹起", event)
    //            art.playbackRate = before_playbackRate;
    //            before_playbackRate = 0;
    //        }
    //        keyStatus = 0;
    //    }
    //});


    //art.on('video:ratechange', () => {
    //    console.info('video:ratechange');
    //});

    //art.on('hotkey', (event) => {
    //    if (event.keyCode === 39) {
    //        var now = new Date().getTime();
    //        if ((now - beforeTime) < longPressDuration) {
    //            console.log("长按")
    //        }else {
    //            console.info('hotkey', event, '时间',new Date().getTime());
    //        }
    //        beforeTime = now;
    //    }
    //});

    //art.on('ready', () => {
    //    console.info(art.playbackRate);
    //    art.playbackRate = 2;
    //    console.info(art.playbackRate);
    //});


    /**
     * https://bi.cool/bi/63jgqKX
     * @type {number}
     */
    //let last = Date.now(), ticks = 0, timer = null;
    //function rafLoop() {
    //    ticks += 1;
    //    if (ticks >= 30) {
    //        const now = Date.now();
    //        const diff = now - last
    //        const fps = Math.round(1000 / (diff / ticks));
    //        last = now
    //        ticks = 0
    //        renderFps(fps);
    //    }
    //    timer = requestAnimationFrame(rafLoop);
    //}
//
    //function renderFps(fps) {
    //    console.log("画面帧率：", fps);
    //}
//
    //function startLoop(){
    //    rafLoop();
    //}
//
    //function stopLoop(){
    //    cancelAnimationFrame(timer)
    //}



    // 更新网速的函数
    var video = $("video")[0];
    function updateLoadingSpeed() {
        if (video.readyState > 0) {
            var playedRanges = video.played;//返回表示音频/视频已播放部分的 TimeRanges 对象
            if (video.buffered) {// 返回表示音频/视频已缓冲部分的 TimeRanges 对象
                for (let i = 0; i < video.buffered.length; i++) {
                    var bufferedStart = video.buffered.start(i); // 获取已缓冲的结束时间
                    var bufferedEnd = video.buffered.end(i); // 获取已缓冲的结束时间
                    console.log("网络状态", video.networkState, "缓存片段(", i, ")", "[", bufferedStart, "~", bufferedEnd, "]")
                }
            }
            //var bufferedEnd = video.buffered.end(0); // 获取已缓冲的结束时间
            //var currentTime = video.currentTime; // 获取当前播放时间
            //var loadingSpeed = (bufferedEnd - currentTime) * 1000; // 计算网速（字节/秒）
            //console.log('Loading Speed: ' + (loadingSpeed).toFixed(2) + ' byte/sec')
        }
    }

    function startNetWorkSpeed() {
        setInterval(updateLoadingSpeed, 1000);
    }
</script>
</body>
</html>